AddCSLuaFile( "cl_init.lua" )
AddCSLuaFile( "shared.lua" )

 include( 'shared.lua' )

 function GM:PlayerSpawn( ply )

 -- Put what happens when the player spawns (This goes for every player)

 end

 function GM:PlayerInitialSpawn( ply )

	 ply:ConCommand( "team_menu" )

 end

 function GM:PlayerLoadout( ply )

     if ply:Team() == 1 then

         ply:SetMaxHealth( 75, true )
		 ply:Give( "weapon_physcannon" )
		 ply:SetModel( "model/player/kleiner.mdl" )
		 ply:Give( "item_bettery", 5 )
		 ply:Give( "weapon_stunstick" )

     elseif ply:Team() == 2 then

		 ply:SetMaxHealth( 90, true )
         ply:Give( "weapon_physgun" )
		 ply:SetModel( "models/player/Eli.mdl" )
		 ply:Give( "weapon_crowbar" )
		 ply:Give( "weapon_pistol" )
		 ply:GiveAmmo( 180, "pistol" )

	 elseif ply:Team() == 3 then

		 ply:SetMaxHealth( 120, true )
		 ply:Give( "weapon_AR2" )
		 ply:GiveAmmo( 360, "AR2" )
		 ply:SetModel( "models/player/gman_high.mdl" )
		 ply:Give( "weapon_crowbar" )
		 ply:Give( "weapon_stunstick" )

	elseif ply:Team() == 4 then

		ply:SetMaxHealth( 200, true )
		ply:Give( "weapon_frag" )
		ply:GiveAmmo( 7, "frag" )
		ply:Give( "weapon_physcannon" )
		ply:Give( "weapon_rpg" )
		ply:GiveAmmo( 30, "rpg" )
	    ply:Give( "weapon_physgun" )
		ply:SetModel( "models/player/Barney.mdl" )

	elseif ply:Team() == 5 then

		ply:SetMaxHealth( 500, true )
		ply:Give( "weapon_crowbar" )
		ply:SetModel( "models/player/Mossman.mdl" )
		ply:Give( "weapon_pistol" )
		ply:GiveAmmo( 180, "pistol" )
		ply:Give( "weapon_smg1" )
		ply:GiveAmmo( 500, "smg1" )
		ply:Give( "weapon_frag" )
		ply:GiveAmmo( 7, "frag" )
		ply:Give( "weapon_physcannon" )
		ply:Give( "weapon_crossbow" )
		ply:GiveAmmo( 10, "crossbow" )
		ply:Give( "weapon_shotgun" )
		ply:GiveAmmo( 30, "shotgun" )
		ply:Give( "weapon_357" )
		ply:GiveAmmo( 36, "357" )
		ply:Give( "weapon_rpg" )
		ply:GiveAmmo( 10, "rpg" )
		ply:Give( "weapon_ar2" )
		ply:GiveAmmo( 360, "ar2" )
		ply:Give( "gmod_tool" )
	    ply:Give( "gmod_camera" )
	    ply:Give( "weapon_physgun" )

	 elseif ply:Team() == 6 then

		ply:SetMaxHealth( 100, true )
		ply:Give( "weapon_crossbow" )
		ply:GiveAmmo( 500, "crossbow" )
		ply:SetModel( "models/player/Alex.mdl" )

	elseif ply:Team() == 7 then

		ply:SetMaxHealth( 200, true )
		ply:Give( "weapon_physcannon" )
		ply:Give( "weapon_shotgun" )
		ply:GiveAmmo( 60, "shotgun" )
		ply:SetModel( "models/player/Breen.mdl" )

	 elseif ply:Team() == 8 then

		ply:SetMaxHealth( 130, true )
		ply:Give( "weapon_crowbar" )
		ply:SetModel( "models/player/Group01/male_01.mdl" )
		ply:Give( "weapon_pistol" )
		ply:GiveAmmo( 180, "pistol" )
		ply:Give( "weapon_smg1" )
		ply:GiveAmmo( 500, "smg1" )
		ply:Give( "weapon_frag" )
		ply:GiveAmmo( 7, "frag" )
		ply:Give( "weapon_physcannon" )
		ply:Give( "weapon_crossbow" )
		ply:GiveAmmo( 10, "crossbow" )
		ply:Give( "weapon_shotgun" )
		ply:GiveAmmo( 30, "shotgun" )
		ply:Give( "weapon_357" )
		ply:GiveAmmo( 36, "357" )
		ply:Give( "weapon_rpg" )
		ply:GiveAmmo( 10, "rpg" )
		ply:Give( "weapon_ar2" )
		ply:GiveAmmo( 360, "ar2" )
		ply:Give( "gmod_tool" )
	    ply:Give( "gmod_camera" )
	    ply:Give( "weapon_physgun" )


	 end

 end

 function team_1( ply )

     ply:SetTeam( 1 )
	 ply:Spawn()
 end

 function team_2( ply )

     ply:SetTeam( 2 )
	 ply:Spawn()
 end

 function team_3( ply )

	 ply:SetTeam( 3 )
	 ply:Spawn()
 end

 function team_4( ply )

	 ply:SetTeam( 4 )
	 ply:Spawn()
 end

 function team_5( ply )

	 ply:SetTeam( 5 )
	 ply:Spawn()
 end

 function team_6( ply )

	 ply:SetTeam( 6 )
	 ply:Spawn()
 end

 function team_7( ply )

	 ply:SetTeam( 7 )
	 ply:Spawn()
 end

 function team_8( ply )

	 ply:SetTeam( 8 )
	 ply:Spawn()
 end

 concommand.Add( "team_1", team_1 )
 concommand.Add( "team_2", team_2 )
 concommand.Add( "team_3", team_3 )
 concommand.Add( "team_4", team_4 )
 concommand.Add( "team_5", team_5 )
 concommand.Add( "team_6", team_6 )
 concommand.Add( "team_7", team_7 )

